package com.example.demo.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import org.springframework.web.context.support.ServletRequestHandledEvent;

import com.example.demo.util.RequestLoginCache;

@Component
public class RequestEndListener implements ApplicationListener<ServletRequestHandledEvent>{

	@Override
	public void onApplicationEvent(ServletRequestHandledEvent event) {
		//清除本次请求中的登录信息缓存
		RequestLoginCache.clear();
	}

}
